import redis

redis_host = "r-j6cmt5ayr2nq1m6zpp.redis.rds.aliyuncs.com"
redis_db = 0
redis_pwd = "r-j6cmt5ayr2nq1m6zpp:qpalmz1209@L"

#redis
r = redis.StrictRedis(host=redis_host,port=6379, db=redis_db, password=redis_pwd)

queueList = [
    "ws-1",
    "ws-2",
    "ws-3",
    "ws-4"
]

for item in queueList:
    queueKey = "painter:{}:queue".format(item)

    num = r.llen(queueKey)
    print("machine : {}，current queue num : {}".format(item,num))